Optimal. Leaf size=141 \[ \frac {b e n}{6 g (e f-d g) (f+g x)^2}+\frac {b e^2 n}{3 g (e f-d g)^2 (f+g x)}+\frac {b e^3 n \log (d+e x)}{3 g (e f-d g)^3}-\frac {a+b \log \left (c (d+e x)^n\right )}{3 g (f+g x)^3}-\frac {b e^3 n \log (f+g x)}{3 g (e f-d g)^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 141, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {2442, 46}
\begin {gather*} -\frac {a+b \log \left (c (d+e x)^n\right )}{3 g (f+g x)^3}+\frac {b e^3 n \log (d+e x)}{3 g (e f-d g)^3}-\frac {b e^3 n \log (f+g x)}{3 g (e f-d g)^3}+\frac {b e^2 n}{3 g (f+g x) (e f-d g)^2}+\frac {b e n}{6 g (f+g x)^2 (e f-d g)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 46
Rule 2442
Rubi steps
\begin {align*} \int \frac {a+b \log \left (c (d+e x)^n\right )}{(f+g x)^4} \, dx &=-\frac {a+b \log \left (c (d+e x)^n\right )}{3 g (f+g x)^3}+\frac {(b e n) \int \frac {1}{(d+e x) (f+g x)^3} \, dx}{3 g}\\ &=-\frac {a+b \log \left (c (d+e x)^n\right )}{3 g (f+g x)^3}+\frac {(b e n) \int \left (\frac {e^3}{(e f-d g)^3 (d+e x)}-\frac {g}{(e f-d g) (f+g x)^3}-\frac {e g}{(e f-d g)^2 (f+g x)^2}-\frac {e^2 g}{(e f-d g)^3 (f+g x)}\right ) \, dx}{3 g}\\ &=\frac {b e n}{6 g (e f-d g) (f+g x)^2}+\frac {b e^2 n}{3 g (e f-d g)^2 (f+g x)}+\frac {b e^3 n \log (d+e x)}{3 g (e f-d g)^3}-\frac {a+b \log \left (c (d+e x)^n\right )}{3 g (f+g x)^3}-\frac {b e^3 n \log (f+g x)}{3 g (e f-d g)^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.11, size = 110, normalized size = 0.78 \begin {gather*} \frac {-2 \left (a+b \log \left (c (d+e x)^n\right )\right )+\frac {b e n (f+g x) \left ((e f-d g) (3 e f-d g+2 e g x)+2 e^2 (f+g x)^2 \log (d+e x)-2 e^2 (f+g x)^2 \log (f+g x)\right )}{(e f-d g)^3}}{6 g (f+g x)^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.50, size = 950, normalized size = 6.74
method | result | size |
risch | \(-\frac {b \ln \left (\left (e x +d \right )^{n}\right )}{3 g \left (g x +f \right )^{3}}+\frac {6 b d \,e^{2} f \,g^{2} n x +2 \ln \left (-g x -f \right ) b \,e^{3} f^{3} n -3 b \,e^{3} f^{3} n -2 \ln \left (e x +d \right ) b \,e^{3} g^{3} n \,x^{3}+2 \ln \left (-g x -f \right ) b \,e^{3} g^{3} n \,x^{3}-2 \ln \left (e x +d \right ) b \,e^{3} f^{3} n +2 a \,e^{3} f^{3}-i \pi b \,d^{3} g^{3} \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}+i \pi b \,e^{3} f^{3} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}+i \pi b \,e^{3} f^{3} \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}-i \pi b \,d^{3} g^{3} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}+6 a \,d^{2} e f \,g^{2}-6 a d \,e^{2} f^{2} g -6 \ln \left (e x +d \right ) b \,e^{3} f \,g^{2} n \,x^{2}+6 \ln \left (-g x -f \right ) b \,e^{3} f \,g^{2} n \,x^{2}-6 \ln \left (e x +d \right ) b \,e^{3} f^{2} g n x +6 \ln \left (-g x -f \right ) b \,e^{3} f^{2} g n x -5 b \,e^{3} f^{2} g n x -2 a \,d^{3} g^{3}-b \,d^{2} e f n \,g^{2}+4 b d \,e^{2} f^{2} n g -b \,d^{2} e \,g^{3} n x -2 \ln \left (c \right ) b \,d^{3} g^{3}+2 \ln \left (c \right ) b \,e^{3} f^{3}+3 i \pi b \,d^{2} e f \,g^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}+3 i \pi b \,d^{2} e f \,g^{2} \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}-3 i \pi b d \,e^{2} f^{2} g \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}-3 i \pi b d \,e^{2} f^{2} g \,\mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}-3 i \pi b \,d^{2} e f \,g^{2} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )+3 i \pi b d \,e^{2} f^{2} g \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )-i \pi b \,e^{3} f^{3} \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}+i \pi b \,d^{3} g^{3} \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}+2 b d \,e^{2} g^{3} n \,x^{2}+i \pi b \,d^{3} g^{3} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )-3 i \pi b \,d^{2} e f \,g^{2} \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}+3 i \pi b d \,e^{2} f^{2} g \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}-i \pi b \,e^{3} f^{3} \mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i \left (e x +d \right )^{n}\right ) \mathrm {csgn}\left (i c \left (e x +d \right )^{n}\right )+6 \ln \left (c \right ) b \,d^{2} e f \,g^{2}-6 \ln \left (c \right ) b d \,e^{2} f^{2} g -2 b \,e^{3} f \,g^{2} n \,x^{2}}{6 \left (g x +f \right )^{3} \left (d^{2} g^{2}-2 d e f g +e^{2} f^{2}\right ) \left (d g -e f \right ) g}\) | \(950\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 302 vs.
\(2 (135) = 270\).
time = 0.30, size = 302, normalized size = 2.14 \begin {gather*} \frac {1}{6} \, b n {\left (\frac {2 \, e^{2} \log \left (g x + f\right )}{d^{3} g^{4} - 3 \, d^{2} f g^{3} e + 3 \, d f^{2} g^{2} e^{2} - f^{3} g e^{3}} - \frac {2 \, e^{2} \log \left (x e + d\right )}{d^{3} g^{4} - 3 \, d^{2} f g^{3} e + 3 \, d f^{2} g^{2} e^{2} - f^{3} g e^{3}} + \frac {2 \, g x e - d g + 3 \, f e}{d^{2} f^{2} g^{3} - 2 \, d f^{3} g^{2} e + f^{4} g e^{2} + {\left (d^{2} g^{5} - 2 \, d f g^{4} e + f^{2} g^{3} e^{2}\right )} x^{2} + 2 \, {\left (d^{2} f g^{4} - 2 \, d f^{2} g^{3} e + f^{3} g^{2} e^{2}\right )} x}\right )} e - \frac {b \log \left ({\left (x e + d\right )}^{n} c\right )}{3 \, {\left (g^{4} x^{3} + 3 \, f g^{3} x^{2} + 3 \, f^{2} g^{2} x + f^{3} g\right )}} - \frac {a}{3 \, {\left (g^{4} x^{3} + 3 \, f g^{3} x^{2} + 3 \, f^{2} g^{2} x + f^{3} g\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 475 vs.
\(2 (135) = 270\).
time = 0.38, size = 475, normalized size = 3.37 \begin {gather*} -\frac {2 \, a d^{3} g^{3} - 2 \, {\left (b g^{3} n x^{3} + 3 \, b f g^{2} n x^{2} + 3 \, b f^{2} g n x + b f^{3} n\right )} e^{3} \log \left (g x + f\right ) + {\left (2 \, b f g^{2} n x^{2} + 5 \, b f^{2} g n x + 3 \, b f^{3} n - 2 \, a f^{3}\right )} e^{3} - 2 \, {\left (b d g^{3} n x^{2} + 3 \, b d f g^{2} n x + 2 \, b d f^{2} g n - 3 \, a d f^{2} g\right )} e^{2} + {\left (b d^{2} g^{3} n x + b d^{2} f g^{2} n - 6 \, a d^{2} f g^{2}\right )} e + 2 \, {\left (b d^{3} g^{3} n - 3 \, b d^{2} f g^{2} n e + 3 \, b d f^{2} g n e^{2} + {\left (b g^{3} n x^{3} + 3 \, b f g^{2} n x^{2} + 3 \, b f^{2} g n x\right )} e^{3}\right )} \log \left (x e + d\right ) + 2 \, {\left (b d^{3} g^{3} - 3 \, b d^{2} f g^{2} e + 3 \, b d f^{2} g e^{2} - b f^{3} e^{3}\right )} \log \left (c\right )}{6 \, {\left (d^{3} g^{7} x^{3} + 3 \, d^{3} f g^{6} x^{2} + 3 \, d^{3} f^{2} g^{5} x + d^{3} f^{3} g^{4} - {\left (f^{3} g^{4} x^{3} + 3 \, f^{4} g^{3} x^{2} + 3 \, f^{5} g^{2} x + f^{6} g\right )} e^{3} + 3 \, {\left (d f^{2} g^{5} x^{3} + 3 \, d f^{3} g^{4} x^{2} + 3 \, d f^{4} g^{3} x + d f^{5} g^{2}\right )} e^{2} - 3 \, {\left (d^{2} f g^{6} x^{3} + 3 \, d^{2} f^{2} g^{5} x^{2} + 3 \, d^{2} f^{3} g^{4} x + d^{2} f^{4} g^{3}\right )} e\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: HeuristicGCDFailed} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 565 vs.
\(2 (135) = 270\).
time = 3.83, size = 565, normalized size = 4.01 \begin {gather*} \frac {2 \, b g^{3} n x^{3} e^{3} \log \left (g x + f\right ) - 2 \, b g^{3} n x^{3} e^{3} \log \left (x e + d\right ) + 2 \, b d g^{3} n x^{2} e^{2} - b d^{2} g^{3} n x e + 6 \, b f g^{2} n x^{2} e^{3} \log \left (g x + f\right ) - 2 \, b d^{3} g^{3} n \log \left (x e + d\right ) - 6 \, b f g^{2} n x^{2} e^{3} \log \left (x e + d\right ) + 6 \, b d^{2} f g^{2} n e \log \left (x e + d\right ) - 2 \, b f g^{2} n x^{2} e^{3} + 6 \, b d f g^{2} n x e^{2} - b d^{2} f g^{2} n e + 6 \, b f^{2} g n x e^{3} \log \left (g x + f\right ) - 6 \, b f^{2} g n x e^{3} \log \left (x e + d\right ) - 6 \, b d f^{2} g n e^{2} \log \left (x e + d\right ) - 2 \, b d^{3} g^{3} \log \left (c\right ) + 6 \, b d^{2} f g^{2} e \log \left (c\right ) - 2 \, a d^{3} g^{3} - 5 \, b f^{2} g n x e^{3} + 4 \, b d f^{2} g n e^{2} + 6 \, a d^{2} f g^{2} e + 2 \, b f^{3} n e^{3} \log \left (g x + f\right ) - 6 \, b d f^{2} g e^{2} \log \left (c\right ) - 3 \, b f^{3} n e^{3} - 6 \, a d f^{2} g e^{2} + 2 \, b f^{3} e^{3} \log \left (c\right ) + 2 \, a f^{3} e^{3}}{6 \, {\left (d^{3} g^{7} x^{3} - 3 \, d^{2} f g^{6} x^{3} e + 3 \, d^{3} f g^{6} x^{2} + 3 \, d f^{2} g^{5} x^{3} e^{2} - 9 \, d^{2} f^{2} g^{5} x^{2} e + 3 \, d^{3} f^{2} g^{5} x - f^{3} g^{4} x^{3} e^{3} + 9 \, d f^{3} g^{4} x^{2} e^{2} - 9 \, d^{2} f^{3} g^{4} x e + d^{3} f^{3} g^{4} - 3 \, f^{4} g^{3} x^{2} e^{3} + 9 \, d f^{4} g^{3} x e^{2} - 3 \, d^{2} f^{4} g^{3} e - 3 \, f^{5} g^{2} x e^{3} + 3 \, d f^{5} g^{2} e^{2} - f^{6} g e^{3}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.94, size = 283, normalized size = 2.01 \begin {gather*} \frac {2\,a\,d\,e\,f}{3\,{\left (f+g\,x\right )}^3\,{\left (d\,g-e\,f\right )}^2}-\frac {a\,d^2\,g}{3\,{\left (f+g\,x\right )}^3\,{\left (d\,g-e\,f\right )}^2}-\frac {b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )}{3\,g\,{\left (f+g\,x\right )}^3}-\frac {a\,e^2\,f^2}{3\,g\,{\left (f+g\,x\right )}^3\,{\left (d\,g-e\,f\right )}^2}+\frac {5\,b\,e^2\,f\,n\,x}{6\,{\left (f+g\,x\right )}^3\,{\left (d\,g-e\,f\right )}^2}+\frac {b\,e^2\,g\,n\,x^2}{3\,{\left (f+g\,x\right )}^3\,{\left (d\,g-e\,f\right )}^2}-\frac {b\,d\,e\,f\,n}{6\,{\left (f+g\,x\right )}^3\,{\left (d\,g-e\,f\right )}^2}+\frac {b\,e^2\,f^2\,n}{2\,g\,{\left (f+g\,x\right )}^3\,{\left (d\,g-e\,f\right )}^2}-\frac {b\,d\,e\,g\,n\,x}{6\,{\left (f+g\,x\right )}^3\,{\left (d\,g-e\,f\right )}^2}+\frac {b\,e^3\,n\,\mathrm {atan}\left (\frac {d\,g\,1{}\mathrm {i}+e\,f\,1{}\mathrm {i}+e\,g\,x\,2{}\mathrm {i}}{d\,g-e\,f}\right )\,2{}\mathrm {i}}{3\,g\,{\left (d\,g-e\,f\right )}^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________